#include<bits/stdc++.h>
using namespace std;
#define int long long


int cnt[26];


signed main() {
//	system("start https://www.lanqiao.cn/problems/3986/learning/");

	int n;
	cin >> n;

	string s;
	cin >> s;

	for (auto i : s)	cnt[i - 'a']++;

	bool flag = 0;

	for (auto i : s)	{
		if (cnt[i - 'a'] == 1) {
			cout << i;
			flag = 1;
			break;
		}
	}
	if (!flag)
		cout << "-1";

	return 0;
}
